package xyz.bali16.module.netdisk.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.bali16.module.netdisk.entity.FileFolder;
import xyz.bali16.module.netdisk.model.filefolder.FileFolderAddParam;
import xyz.bali16.module.netdisk.model.filefolder.FileFolderPageParam;
import xyz.bali16.module.netdisk.model.filefolder.FileFolderUpdateParam;
import xyz.bali16.module.netdisk.model.filestorage.FileStorageAddParam;
import xyz.bali16.module.netdisk.model.filestorage.FileStorageUpdateParam;

import java.util.List;

public interface FileFolderService extends IService<FileFolder> {

    IPage<FileFolder> getPage(FileFolderPageParam param);

    /**
     * 根据文件目录ID获取文件列表
     * @param fileFolderId
     * @return
     */
//    List<UploadFile> getFilesByFileFolderId(String fileFolderId);
    /**
     * 根据父文件目录ID获取文件夹列表
     * @param
     * @return
     */
    List<FileFolder> getFileFoldersByParentFolderId(String parentFolderId);

    /**
     * 根据文件存储仓库ID
     * @param fileStoreId
     * @return
     */
    List<FileFolder> getRootFoldersByFileStorageId(String fileStorageId);
    void add(FileFolderAddParam param) throws Exception;

    void update(FileFolderUpdateParam param) throws Exception;
    void delete(String fileFolderId) throws Exception;
}
